﻿<%@ Import namespace="System"%>
<%@ Import namespace="System.Data"  %>
<%@ Page language="c#" Codebehind="MyCalendarList.aspx.cs" AutoEventWireup="false" Inherits="UDS.SubModule.MyCalendar.MyCalendarList" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="zh-cn" />
<meta name="author" content="Herry" />
<meta name="Copyright" content="Copyright (c) 2009 himm.cn" />
<title>我的日程</title>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link rel="stylesheet" type="text/css" href="/css/other.css" media="screen" />
<link rel="stylesheet" type="text/css" href="/css/table.css" />
<script language="javascript">
		function dialwinprocess(strID)
		{
		
				var newdialoguewin = window.showModalDialog("MyCalendarDetails.aspx?ID="+strID,window,"dialogWidth:700px;DialogHeight=620px;status:no");
			
		}
		
		function SelectItem()
		{
			var i = 0;
			var e;

			for( i = 0 ; i < ListView.elements.length ; i ++ )
			{
				e = ListView.elements[ i ];
				if( e.type == "checkbox" )	e.checked = !e.checked;
			}
		}
		
		// 高亮背景
		function high( which )
		{ 
			which.style.background = "#C0D9E6";
			which.style.font.color = "red";
		} 

		// 取消背景高亮
		function low( which )
		{ 
			which.style.background = "#FFFFFF";
			which.style.font.color = "black";
		}
		
	</script>
	<script language="javascript">
		
	var ball1 = new Image();
	var ball2 = new Image();
	ball1.src = 'images/ball1.gif';
	ball2.src = 'images/ball2.gif';

	var active = new Image();
	var nonactive = new Image();
	active.src = '../../images/maillistbutton2.gif';
	nonactive.src = '../../images/maillistbutton1.gif';

	function onMouseOver(img)
	{
		document.images[img].src = ball2.src;
	}

	function onMouseOut(img)
	{
		document.images[img].src = ball1.src;
	}

	function onOverBar(bar)
	{
		if (bar != null) {
			bar.style.backgroundImage = "url("+active.src+")";
			
		}
	}

	function onOutBar(bar)
	{
		if (bar != null) {
			bar.style.backgroundImage = "url("+nonactive.src+")";
		}
	}
	
	function selectAll(){
		var len=document.MailList.elements.length;
		var i;
		for (i=0;i<len;i++){
		if (document.MailList.elements[i].type=="checkbox"){
			document.MailList.elements[i].checked=true;								
					 }
				}
			}

	function unSelectAll(){
		  var len=document.MailList.elements.length;
		  var i;
		  for (i=0;i<len;i++){
			   if (document.MailList.elements[i].type=="checkbox"){
				  document.MailList.elements[i].checked=false; 
			   }   
			 } 
		}		

	</script>
</head>
<body>
		<form id="ListView" runat="server">		
    <div class="m">
    <div class="path"><a href="/SubModule/UnitiveDocument/Desktop.aspx">我的桌面</a> >> 我的日程</div>
    <div class="con">
        <div class="tabnav">
        <p class="tabnavhead"> 
        <span id="bar1" class="<% Response.Write(DisplayType==0?"active2":"active1");%> tnc"><asp:LinkButton ID="lbMy" runat="server" OnClick="lbMy_Click">我的日程</asp:LinkButton></span> 
        <span id="bar2" class="<% Response.Write(DisplayType==1?"active2":"active1");%> tnc"><asp:LinkButton ID="lbOther" runat="server" OnClick="lbOther_Click">他人的日程</asp:LinkButton></span>
        <asp:Button ID="btnPlanAdd" runat="server"  Text=" 添 加 日 程 "  class="redButtonCss" style="width: 100px; height: 20px" OnClick="btnPlanAdd_Click1" />
        </p>
      </div>

        <asp:datagrid id="dbStaffList" runat="server" Width="100%" CellPadding="3" BackColor="White" BorderStyle="None"  BorderColor="#337FB2" BorderWidth="1px" PageSize="15" AutoGenerateColumns="False" AllowPaging="True"
            DataKeyField="ID" OnPageIndexChanged="DataGrid_PageChanged" OnDeleteCommand="dbStaffList_DeleteCommand"><SelectedItemStyle Font-Bold="True" ForeColor="#CCFF99" BackColor="#009999"></SelectedItemStyle>
            <AlternatingItemStyle  BackColor="#E8F4FF"></AlternatingItemStyle>
            <ItemStyle  ForeColor="#003399" BackColor="White"></ItemStyle>
            <HeaderStyle  Font-Bold="True" ForeColor="White" BackColor="#337FB2"></HeaderStyle>
            <FooterStyle  HorizontalAlign="Right" ForeColor="#003399" BackColor="#99CCCC"></FooterStyle>
            <Columns>		
                    <asp:BoundColumn DataField="CalendarStartDate" HeaderText="开始日期">
                    <HeaderStyle HorizontalAlign="center" Width="12%"></HeaderStyle>									
                </asp:BoundColumn>
                    <asp:BoundColumn DataField="CalendarEndDate" HeaderText="计划结束时间">
                    <HeaderStyle HorizontalAlign="center" Width="12%"></HeaderStyle>									
                </asp:BoundColumn>
            
                    <asp:BoundColumn DataField="CalendarFinishedTime" HeaderText="完成时间">
                    <HeaderStyle HorizontalAlign="center" Width="12%"></HeaderStyle>									
                </asp:BoundColumn>
                <asp:TemplateColumn HeaderText="工作内容">
                    <HeaderStyle HorizontalAlign="Center" Width="30%"></HeaderStyle>
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                    <ItemTemplate>
                        <a href="#" onclick='javascript:return dialwinprocess("<%# DataBinder.Eval(Container, "DataItem.ID") %>")'>
                            <asp:Label runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.CalendarContent") %>' ID="Label3" NAME="Label3"></asp:Label></a>
                    </ItemTemplate>
                </asp:TemplateColumn>				
            <asp:BoundColumn DataField="CalendarUserName" HeaderText="日程提交">
                    <HeaderStyle Width="8%" HorizontalAlign="center"></HeaderStyle>
                </asp:BoundColumn>
                <asp:BoundColumn DataField="CalendarRealName" HeaderText="日程查看">
                    <HeaderStyle Width="8%" HorizontalAlign="center"></HeaderStyle>
                </asp:BoundColumn>
                <asp:BoundColumn DataField="CalendarStatus" HeaderText="状态">
                    <HeaderStyle Width="8%" HorizontalAlign="center"></HeaderStyle>
                </asp:BoundColumn>
            <asp:TemplateColumn HeaderText="修改">
                <itemstyle horizontalalign="Center"></itemstyle>
<itemtemplate><a href="MyCalendarEdit.aspx?ID=<%# DataBinder.Eval(Container.DataItem, "ID").ToString() %>">修改</a>
<headerstyle horizontalalign="Center" width="6%"></headerstyle></itemtemplate>
                <headerstyle horizontalalign="Center" width="6%"></headerstyle>
            </asp:TemplateColumn>                           
            
            <asp:TemplateColumn HeaderText="删除">
                <itemstyle horizontalalign="Center"></itemstyle>
<itemtemplate><asp:LinkButton runat="server" ID="lbtDelete" CommandName="Delete"  OnClientClick="return confirm('确认删除？')" >删除</asp:LinkButton><asp:TextBox runat="server" Text='删除' ID="txbResourceId" style="display:none" ></asp:TextBox></itemtemplate>
                <headerstyle horizontalalign="Center" width="6%"></headerstyle>
            </asp:TemplateColumn>                            
             
            </Columns>
            <PagerStyle  HorizontalAlign="Right" ForeColor="#003399" BackColor="#E8F4FF"
                Mode="NumericPages"></PagerStyle>
        </asp:datagrid>
    </div>
  </div>
</form>
</body>
</html>
